package com.hmall.feign.client;

import com.hmall.feign.common.pojo.Address;
import com.hmall.feign.config.MyConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "userservice" ,configuration = MyConfig.class)
public interface UserFeign {
    /**
     * 根据地址id查询地址
     * @param id
     * @return
     */
    @GetMapping("/address/{id}")
    Address findAddressById(@PathVariable("id") Long id);
}
